package top.zhouze.common.annotation;

import top.zhouze.common.constant.ThreadMode;

import java.lang.annotation.*;

import static top.zhouze.common.constant.Constants.DEFAULT_TAG;


/**
 * 订阅
 *
 * @author 周仄
 * @date 2023-12-05 10:12:12
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Subscriber {
    String tag() default DEFAULT_TAG;
    ThreadMode mode() default ThreadMode.MAIN;
    boolean isSticky() default false;
    boolean readOnlyOnce() default true;
}
